
//增加联系记录
$('#btn_add_reply').click(function(){
	var replyContent = $('#reply_content').val();
	if(replyContent == ""){
		bootbox.alert('回复内容不能为空.');
		return;
	}
	var feedbackId = $('#feedbackId').val();
	var json = "{\"feedbackId\":\""+feedbackId+"\",\"replyContent\":\""+replyContent+"\"}";
	$.ajax({
    	type:"post",
        contentType:"application/json; charset=UTF-8",
        url: ctx + "/feedback/addReply",
        data:json,
        dataType:"json",
        success: function(msg){
        	$('#dsimiss_add_relation').click();
        	$('#reply_content').val('');
        	$.teninedialog({
                title:'系统提示',
                content:msg.message,
                showCloseButton:false,
                otherButtons:["确定"],
                otherButtonStyles:['btn-primary'],
                bootstrapModalOption:{keyboard: true},
                clickButton:function(sender,modal,index){
                	location.reload();
                }
            });
        },
        error: function (msg) {
        	$('#dsimiss_add_relation').click();
        	$.teninedialog({
                title:'系统提示',
                content:"服务器偷了个小懒,查询联系记录失败了！",
                showCloseButton:false,
                otherButtons:["确定"],
                otherButtonStyles:['btn-primary'],
                bootstrapModalOption:{keyboard: true},
                clickButton:function(sender,modal,index){
                	location.reload();
                }
            });
        }
    });
});


